Skip to content

Conversation

@pcriadoperez
Copy link
Collaborator

Problem

When closing the BinanceWebsocket in some cases the websocket will close before the readloop, causing the read loop to return to the user a ClosedConnectionError.

Solution

  • When closing the binanceWebsocket, first the read loop is exited and the websocket is stopped.
  • Remove unnecesary line of setting the ws state to Exiting as it's done already inside _kill_read_loop

@pcriadoperez pcriadoperez self-assigned this Dec 30, 2024
@coveralls
Copy link

Coverage Status

coverage: 68.945% (-0.02%) from 68.96%
when pulling 27e5772 on pcriadoperez:1530
into d8e2ce1 on sammchardy:master.

@carlosmiei carlosmiei merged commit 658f1fb into sammchardy:master Dec 30, 2024
9 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants